{extend name="../../admin/view/main"}

{block name='content'}
<form action="{:sysuri()}" class="layui-card layui-form" data-auto="true" method="post">
    <div class="layui-card-body">

        <label class="layui-form-item relative block">
            <span class="help-label"><b>版本号</b>News Title</span>
            <input class="layui-input" name="version_name"  required  value='{$vo.version_name|default=""}'>
        </label>


        <label class="layui-form-item relative block">
            <span class="help-label"><b>类型</b></span>
            <select class='layui-select' name='type' lay-search>
                {foreach $cates as $cate}
                {if isset($vo.type) and $vo.type eq $cate.id}
                <option selected value='{$cate.id}'>{$cate.name}</option>
                {else}
                <option value='{$cate.id}'>{$cate.name}</option>
                {/if}
                {/foreach}
            </select>
        </label>
        <label class="layui-form-item relative block">
            <span class="help-label"><b>下载地址</b></span>
            <input name="url"  data-max-width="500" data-max-height="500" data-type="apk" value='{$vo.url|default=""}'>
        </label>
        <!--<label class="layui-form-item relative block">
            <span class="help-label"><b>下载地址</b></span>
            <input class="layui-input" name="url"  required  value='{$vo.url|default=""}'>
        </label>-->

        <div class="hr-line-dashed"></div>
        {notempty name='vo.id'}<input name='id' type='hidden' value='{$vo.id}'>{/notempty}

        <div class="layui-form-item text-center">
            <button class="layui-btn" type="submit">保存数据</button>
            <button class="layui-btn layui-btn-danger" data-history-back data-confirm="确定要取消编辑吗？" type='button'>取消编辑</button>
        </div>
    </div>

</form>
<script>
    $('input[name="url"]').uploadOneImage();
    /* require(['ckeditor'], function () {
         window.createEditor('[name=content]', {height: 350})
     });*/
</script>
{/block}